1. Field of the Invention
The present application relates generally to memory arrays. More specifically, the present application relates generally to a method and apparatus for implementing complex logic within a memory array.
2. Description of the Related Art
Content-addressable memory (CAM) is a special type of computer memory used in certain very high speed searching applications. Content-addressable memory may also be known as associative memory, associative storage, or associative array.
Unlike standard computer memory, random access memory (RAM) in which the user supplies a memory address and the RAM returns the data word stored at that address, a CAM is designed such that the user supplies a data word and the CAM searches its entire memory to see if that data word is stored anywhere in it. If the data word is found, the CAM returns a list of one or more storage addresses where the word was found, and in some architectures, it also returns the data word or other associated pieces of data. Thus, a CAM is the hardware embodiment of what in software terms would be called an associative array.
Because a CAM is designed to search its entire memory in a single operation, it is much faster than RAM in virtually all search applications. Unlike a RAM chip, which has simple storage cells, each individual memory bit in a fully parallel CAM must have its own associated comparison circuit to detect a match between the stored bit and the input bit. However, some CAMs require more than just a bit-to-bit comparison. A bit-to-bit comparison can be achieved with a XNOR gate and then ANDing each result to find if an entire line matches. A XNOR gate is a digital logic gate that implements logical equality. For more complicated CAMs, just a XNOR gate itself is not sufficient to perform the desired logical function.